<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head>
    <title>Index</title>
</h:head>
<h:body onload="#{LoginManaged.logout()}">
    <p:panel header="Login">
        <h:form id="login">
            <p:outputLabel value="#{LoginManaged.errorMessage}"/>
            <h:panelGrid columns="2" cellpadding="5">
                <p:outputLabel value="Username:"/>
                <p:inputText id="username" value="#{LoginManaged.username}"/>
                <p:outputLabel value="Password:"/>
                <p:password id="password" value="#{LoginManaged.password}"/>
                <p:commandButton id="submit" value="Login" ajax="false"
                             action="#{LoginManaged.login}"/>
            </h:panelGrid>
        </h:form>
        <h:panelGrid>
                <h:link value="Register" outcome="registration"/>
                <h:link value="Employee access" outcome="admin/home.xhtml"/>
        </h:panelGrid>
    </p:panel>
</h:body>
</html>

